<template>
  <div class="container">
    <van-button round type="info" class="button" @click="shopowner"
      >立刻申请</van-button
    >
  </div>
</template>

<script>
import { addShopowner } from "../../api/api";
export default {
  data() {
    return {};
  },
  methods: {
    addShopwner() {
      this.$toast.clear();
      console.log("申请");
    },
    shopowner() {
      const data = {
        user_id: localStorage.getItem("userId"),
      };
      addShopowner(data).then((res) => {
        this.$toast.success(res.msg);
        console.log("成为店长---", res);
      });
    },
  },
};
</script>

<style lang="less" scoped>
.container {
  width: 100vw;
  height: 100vh;
  background-image: url("../../assets/image11.png");
  background-size: 100% 100%;

  .button {
    width: 80%;
    letter-spacing: 2px;
    position: fixed;
    bottom: 60px;
    left: 10%;
    background-color: #27191a;
  }
}
</style>